using System;
using UnityEngine;

[CreateAssetMenu(menuName = "Rendering/Custom SSR Settings")]
public class SSRSettings : ScriptableObject {
	[SerializeField]
	public bool Enable = false;

	[SerializeField]
	Shader shader = default;

	[System.NonSerialized]
	Material material;

	[SerializeField]
	[Range(0.0f, 1.0f)]
	float roughnessCut;

	public Material Material {
		get {
			if (material == null && shader != null) {
				material = new Material(shader);
				material.hideFlags = HideFlags.HideAndDontSave;
			}
			return material;
		}
	}
}